<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="root">
        <span v-bind:title="message">
            鼠标悬停几秒钟查看此处动态绑定的提示信息！
        </span>
        <hr/>
        <ol>
            <li v-for="todo in todos">
              {{ todo.text }}
            </li>
          </ol>
        <hr/>
        <span>{{mess}}</span>
        <button v-on:click="reverseMess">点击反转</button>
    </div>
</body>
   <script>
       const vm = new Vue({
        el:'#root',
        data:{
            mess:'hello,vue',
            message:'页面加载于'+ new Date().toLocaleString(),
            todos:[
              { text: '学习 JavaScript' },
              { text: '学习 Vue' },
              { text: '整个牛项目' }
            ]    
        },
        methods: {
            reverseMess:function(){
                 this.mess = this.mess.split('').reverse().join('') 
            }
        },
       })
   </script>
</html>